<?php
    include('../Lib/php/conex.php');
	$link= conectaSQL("influenza","inf123456","influenza");
	import_request_variables('gP');
	header("Content-Type: text/html; charset=iso-8859-1");
	$sql="select TOP 10 a.nombre+' '+b.corto as guarderia from catalogos.dbo.Cat_Guarderias_imss a
inner join catalogos.dbo.entidad b on a.id_entidad = b.entidad
WHERE a.nombre LIKE '%".strtoupper($value)."%'
group by a.nombre, b.corto, a.id_entidad 
order by a.nombre, b.corto, a.id_entidad";
	$select = mssql_query($sql,$link) or die(mssql_get_last_message().$sql);
	$registros = mssql_num_rows($select);
	echo "<ul>";
	if(mssql_num_rows($select) == 0){
		echo "<li style='visibility:collapse'>No hay resultados</li>";
	} else{
		for($a=0;$a<(mssql_num_rows($select));$a++){
			$reg = mssql_fetch_array($select);
			echo "<li >".$reg[0]."</li>";
		}
	}
	echo "</ul>";

?>

